<?
	//include("ckeditor_config.php");	
switch($act){
	
	case "list_full":
	ShowListPlayer();	
	$tpl="list_full";
	break;
	
	default:
	ShowListPlayer();
	$title_page = "CMS - Sản phẩm";
	$tpl="list_full";
}

function ShowListPlayer()
{
	//include("../includes/config.php");	
	
	global $notice, $database, $database2, $db, $arr;		
	global $db, $page, $plpage, $set_per_page, $c;
	
	$server = isset($_GET['sv'])?$_GET['sv']:'';
	
	if($server >= 1)
		$db->db_select_db("daokiemvotinh".$server) || die("Could not connect to SQL db");
		
	$set_per_page=25; 
	$table_edit = "player";	
	$sql="SELECT *, pb.`level` as `level` FROM `".$table_edit."`, playerbattle pb WHERE player.playerId = pb.playerId ";
	//echo $sql;	
	$c = $db->numRows($db->query($sql));
	$plpage = plpage($sql,$page,$set_per_page);
	$sqlstmt = sqlmod($sql,$page,$set_per_page);	
	$arr = $db->getAll($sqlstmt);		
	
	if($server >= 1)
		$db->db_select_db("daokiemvotinh".$server) || die("Could not connect to SQL db");
}
function ShowListPlayer2()
{
	//include("../includes/config.php");	
	
	global $notice, $database, $database2, $db, $arr;	
	
	global $db, $page, $plpage, $set_per_page, $c;
	
	$db->db_select_db("daokiemvotinh2") || die("Could not connect to SQL db");
	$set_per_page=25; 
	$table_edit = "player";	
	$sql="SELECT *, pb.`level` as `level` FROM `".$table_edit."`, playerbattle pb WHERE player.playerId = pb.playerId ";
	//echo $sql;	
	$c = $db->numRows($db->query($sql));
	$plpage = plpage($sql,$page,$set_per_page);
	$sqlstmt = sqlmod($sql,$page,$set_per_page);	
	$arr = $db->getAll($sqlstmt);		
	
	$db->db_select_db("daokiemvotinh") || die("Could not connect to SQL db");
}